namespace Learnive.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class InitialCreate : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Vakkens",
                c => new
                    {
                        vakId = c.Int(nullable: false, identity: true),
                        Naam = c.String(nullable: false, maxLength: 160),
                        Code = c.String(nullable: false, maxLength: 160),
                        Beschrijving = c.String(maxLength: 1024),
                        Jaar_jaarId = c.Int(),
                    })
                .PrimaryKey(t => t.vakId)
                .ForeignKey("dbo.Jaars", t => t.Jaar_jaarId)
                .Index(t => t.Jaar_jaarId);
            
            CreateTable(
                "dbo.Jaars",
                c => new
                    {
                        jaarId = c.Int(nullable: false, identity: true),
                        Naam = c.String(nullable: false, maxLength: 160),
                    })
                .PrimaryKey(t => t.jaarId);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.Vakkens", new[] { "Jaar_jaarId" });
            DropForeignKey("dbo.Vakkens", "Jaar_jaarId", "dbo.Jaars");
            DropTable("dbo.Jaars");
            DropTable("dbo.Vakkens");
        }
    }
}
